﻿@using PagedList
@using PagedList.Mvc
@model IEnumerable<AdminLite.Models.RoleViewModel>

@{
    ViewBag.Title = "角色管理";
}


<div class="box">
    <div class="box-header with-border">
        <h3 class="box-title">角色列表</h3>
        <p class="pull-right">
            @Html.ActionLink("新增", "Create",new {},new {@class= "btn btn-block btn-default" })
        </p>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="table table-bordered table-striped">
            <tr>
                <th style="width: 10px"></th>
                <th>@Html.DisplayNameFor(model => model.Name)</th>
                <th>@Html.DisplayNameFor(model => model.Description)</th>
                <th style="width: 150px">操作</th>
            </tr>
            @foreach (var item in Model)
            {
                <tr>
                    <td>1</td>
                    <td>@Html.DisplayFor(modelItem => item.Name)</td>
                    <td>@Html.DisplayFor(modelItem => item.Description)</td>
                    <td>
                        @Html.ActionLink("编辑", "Edit", new { id = item.Id }) |
                        @Html.ActionLink("详情", "Details", new { id = item.Id }) |
                        @Html.ActionLink("删除", "Delete", new { id = item.Id })
                    </td>
                </tr>
            }

        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer clearfix">
        @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page }))
    </div>
</div>